<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="/editormd/css/editormd.css" />
    <link rel="stylesheet" href="/static/css/bootstrap.min.css">
    <link rel="stylesheet" href="/static/css/index.css">
</head>

<body>

    <div class="container-fluid" id="title-div">
        <div class="row">
            <div class="col-6 offset-2">
                <div class="input-group mb-3">
                    <div class="input-group-prepend">
                        <span class="input-group-text" id="basic-addon1">文章标题</span>
                    </div>
                    <input type="text" class="form-control" placeholder="请输入文章标题" aria-label="Username"
                        aria-describedby="basic-addon1" id="title-input">
                </div>
            </div>
        </div>
    </div>

    <div class="container-fluid">
        <div class="row">
            <div id="test-editor" class="col">
                <textarea style="display:none;">### Editor.md
    
    **Editor.md**: The open source embeddable online markdown editor, based on CodeMirror & jQuery & Marked.
        </textarea>
            </div>
        </div>

    </div>

    <div class="container-fluid" id="article-publish">
        <div class="row">
            <div class="col publish-btn-parent">
                <button type="button" class="btn btn-primary" id="publish-post-btn">发布文章</button>
                <button type="button" class="btn btn-primary" id="return-index-btn">返回列表</button>
            </div>
        </div>
        <div class="row">
            <div class="col">
                <div id="test-markdown-view" class="">
                    <!-- Server-side output Markdown text -->
                    <textarea style="display:none;">### Hello world!</textarea>
                </div>
            </div>
        </div>
    </div>

    <script src="/static/js/jquery.min.js"></script>
    <script src="/static/js/bootstrap.bundle.min.js"></script>
    <script src="/editormd/editormd.min.js"></script>
    <script src="/editormd/lib/marked.min.js"></script>
    <script src="/editormd/lib/prettify.min.js"></script>
    <script src="/static/js/index.js"></script>
    <script>


        $(function () {
            var editor = editormd("test-editor", {
                height: '800px',
                syncScrolling: "single",
                emoji: true,
                //启动本地图片上传功能
                imageUpload: true,
                watch: true,
                imageFormats: ["jpg", "jpeg", "gif", "png", "bmp", "webp", "zip", "rar"],
                path: "./editormd/lib/",
                imageUploadURL: "./upload.php", //文件提交请求路径
                saveHTMLToTextarea: true, //注意3：这个配置，方便post提交表单
                previewTheme: "dark",//预览主题样式 默认白色 dark为黑色
            });
        })
    </script>
</body>

</html>